package com.blyat.xsoft.kernel.restful.service;

import com.blyat.xsoft.kernel.restful.entity.BaseEntity;
import com.blyat.xsoft.kernel.restful.pagination.Page;
import com.blyat.xsoft.kernel.restful.pagination.PageList;

import java.util.List;

/**
 * @Auther: syh
 * @Date: 2020/8/17
 * @Description:
 */
public interface BaseService<T extends BaseEntity> {

    T getById(String id);

    PageList<T> findByPage(T t, String query, Page page);

    int insert(T t);

    int batchInsert(List<T> list);

    int update(T t);

    int batchUpdate(List<T> list);

    int delete(T t);

    int deleteByIds(String[] ids);
}
